package cn.lbwfree.day3_16;

import java.util.Scanner;

/**
 * @date:2020年3月16日
 * @author:lbwfree
 */
public class test1 {
	public static void main(String[] args) {
		Scanner inScanner = new Scanner(System.in);
		int num = inScanner.nextInt();
		int[] arrays= new int[num];
		for (int i = 0; i < arrays.length; i++) {
			arrays[i]=inScanner.nextInt();
		}
		int temp =inScanner.nextInt();
		for (int i = 0; i < arrays.length; i++) {
			if(arrays[i]==temp)
			{
				System.out.println(i+1);
				return;
			}
		}
		System.out.println(0);
	}

}
